<?php
/**
 * Description of Buffer
 *
 * @author chedim
 */
class oByteBuffer extends oClass implements oInterfaceQueue
{
    protected $queue;

    public function push(oByte $data)
    {
        array_push($this->queue, $data);
    }

    /**
     *
     * @return oByte
     */
    public function shift()
    {
        if (count($this->queue) == 0)
                throw new eListEmpty();
        return array_shift($this->queue);
    }
    
    public function is_empty()
    {
        return count($this->queue) == 0;
    }
}
?>
